﻿using task5.BeanFactory;
using task5.Shapes;

namespace task5.Main
{
    class Program
    {
        static void Main(string[] args)
        {
            Factory factory = new Factory();
            List<Shape> shapeList = new List<Shape>();

            for (int i = 0; i < 10; i++)
            {
                shapeList.Add(factory.GetRandomShape());
            }
            shapeList.Add(factory.GetShape(ShapeType.Triangle));

            double sum = 0;
            shapeList.ForEach(s => sum += s.Area);
            Console.WriteLine("Sum of areas: "+sum);
        }
    }
}
